package com.zatech.cgnci.project.base.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;

/**
 * 理赔明细类型
 */
@Getter
@AllArgsConstructor
public enum ClaimDetailTypeEnum {
    INWARD("INWARD", "分入结算"),
    RECOVERY("RECOVERY", "转分摊回");
    public static ClaimDetailTypeEnum getEnumByCode(String code) {
        return Arrays.stream(values()).filter(e -> Objects.equals(e.getCode(), code)).findAny().orElse(null);
    }

    private String code;
    private String descr;


}
